# Calc Explorer
A library for exploring calculus concepts by writing code in Rust.

## Getting Started

### Code Basics
To use the code, _without using containers_, follow these steps.
- Install the rust toolchain.
  - For posix systems:
  ```shell
  sudo apt install build-essential && \
  curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  ```
  - For other systems, use your favorite search engine to find instructions.
- Install git.
  - See: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
- Clone the repository:
  ```shell
  git clone https://notabug.org/c0digam0s/calc-explorer.git
  ```
- Checkout the branch of interest.
  - `master` is the primary branch that all features get merged into.
- Try it out!
  ```shell
  cargo test
  ```

### Using the container for code
To use the container, but just for writing code, follow these steps.
- Follow the steps above pertaining to Git
  - Install Git.
  - Clone the repo.
  - Checkout the branch of interest.
- Install Docker
  - Of course you can use a different container service, but you'll need to
    update some files replacing the `docker` commands with that of your favorite
    service.
  - See: https://docs.docker.com/get-docker/
- Build the container
  - For posix systems, I've included a `Makefile` which has handy helpers.
    - To be clear, we're abusing `Make`'s convenience to run pseudo-scripts of
      command line code.
    - Build the container with `make container`
    - Run the container with `make run`
  - For non-posix systems, I leave it up to you to decipher the `Makefile` commands
    and port them to your system :shrugs:

### Using the container with Jupyter
The container has `jupyter lab` built in. To use this, follow these steps.
- Follow the above steps
  - Follow the Git intall/setup steps
  - Install Docker
  - Build the container
- Run Jupyter
  - Again, use the `Makefile` on posix systems. See note above.
    - Run the `jupyter lab` server with `make jupyter`
    - Close the `jupyter lab` server with `make close`
- Navigate to: http://localhost:9999
  - Use the `Explore.ipynb` to see how it works.
  - New `rust` kernels are available to launch, and you can switch kernels between
    `python` and `rust` as you wish.
    - Of course, `python` code won't execute on a `rust` kernel, and vice-versa.

## Usage permission, license, and code of conduct
I hate all of this.
- The entire repo is licensed under MIT license.
- Which means I give full license to use any part of this repo however you like.
- On the other hand, `rust` has a ridiculous code of conduct, so be sure that
  you comply with that.
  - _ridiculous_ in the sense that there is a code of conduct, and that they are
    proud of it. This is not a judgment on the enumerated expectations, just that
    the existence of such a thing is celebrated by anyone. Freedom!
- `docker` and `python` have their own licensing; educate yourself on them.
- Usage of this repo implicitly accepts any licensing and conduct rules for any
  components therein, and is the responsibility of the user to comply.
